package xjtu.se.articlecommunity.user.myself;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import xjtu.se.articlecommunity.common.CommonService;
import xjtu.se.articlecommunity.common.Result;
import xjtu.se.articlecommunity.common.TokenUtils;
import xjtu.se.articlecommunity.common.dto.CurrentUser;
import xjtu.se.articlecommunity.user.myself.impl.SubService;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/user/subscription")
public class SubAPI {
    @Resource
    SubService subService;

    @Resource
    private CommonService commonService;

    @GetMapping("/getsublist")
    public Result getSubs(@RequestHeader("Token") String token,@RequestParam("u_id") String u_id){
        return Result.success(subService.returnSubList(u_id));
    }
}
